package com.rzjm.api.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rzjm.api.dao.SysDictDao;
import com.rzjm.api.entity.SysDict;
import com.rzjm.api.service.SysDictService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysDictServiceImpl extends BaseServiceImpl<SysDictDao, SysDict> implements SysDictService {
    @Resource
    private SysDictDao sysDictDao;
    @Override
    public SysDict getTypeByTypeAndValue(String type, String value) {
        QueryWrapper<SysDict> qw = new QueryWrapper<>();
        qw.eq("type",type);
        qw.eq("value",value);
        qw.last("limit  1");
        return sysDictDao.selectOne(qw);
    }
}
